﻿package com.logrogue {
	
	/**
	 * Единый контроллер логеров приложения.
	 * 
	 * @version  1.0
	 * @author   meps
	 */
	public class CLog {
		
		private static var m_logger:ILogFactory;
		
		public static function init(logger:ILogFactory, appName:String = null, appVersion:String = null, appBuild:int = 0, ... params):void {
			if (!logger)
				return;
			m_logger = arguments.shift() as ILogFactory;
			m_logger.init.apply(m_logger, arguments);
		}
		
		public static function log(... params):void {
			if (!m_logger)
				return;
			m_logger.log.apply(m_logger, arguments);
		} 
		
		///////////////////////////////////////////////////////////////////////
		
		public function CLog() {
		}
		
	}
	
}